import torch
from transformers import Qwen3VLForConditionalGeneration, AutoTokenizer

model = Qwen3VLForConditionalGeneration.from_pretrained("/data2/wushengyu/model/QwenVL/Qwen3-VL-2B-Instruct")
tokenizer = AutoTokenizer.from_pretrained("/data2/wushengyu/model/QwenVL/Qwen3-VL-2B-Instruct")

# 测试文本输入
inputs = tokenizer("Hello, world!", return_tensors="pt")
outputs = model(**inputs)  # 看是否会报错
print("---inputs: ", inputs)
print("---outputs: ", outputs)

# 如果有图像输入，也需要测试